//delete//
const Utils = require('../util/utils');
const statusCode = require('../util/status-code')
const listData = require("../mock/server/buryPointTask/list");
const detailData = require("../mock/server/buryPointTask/detail");
const xlsx = require('node-xlsx');

//delete//
class BuryPointCardController {
    static async create(ctx) {
        let req = JSON.parse(ctx.request.body);
        if (req.name && req.type && req.pageId && req.calcRule) {
            ctx.response.status = 200;
            ctx.body = statusCode.SUCCESS_200('创建卡片成功', '')
        } else {
            ctx.response.status = 412;
            ctx.body = statusCode.ERROR_412('创建卡片失败，请求参数不能为空！')
        }
    }
    static async list(ctx) {
        ctx.response.status = 200;
        ctx.body = statusCode.SUCCESS_200('success', listData)
    }
    static async detail(ctx) {
        ctx.response.status = 200;
        ctx.body = statusCode.SUCCESS_200('success', detailData)
    }
}
//exports//
module.exports = BuryPointCardController
//exports//